package cn.kxm.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import cn.kxm.pojo.Acl;
import cn.kxm.pojo.Model;
import cn.kxm.pojo.Role;

public interface PowerMapper {

	public List<Map<String, Object>> findone();
	public List<Map<String, Object>> findtwo(@Param("parentId")Integer parentId);
	public List<Map<String, Object>> findthree(@Param("parentId")Integer parentId,
			@Param("roleId")Integer roleId);
	
	public List<Map<String, Object>> findrole(@Param("id")Integer id,@Param("name")String name,
			@Param("page")Integer page,@Param("size")Integer size);
	
	public int getCount(@Param("id")Integer id,@Param("name")String name);
	
	public int getid();
	
	public List<Role> getlist();
	public int add(Role r);
	public Map<String, Object> getoneById(Integer id);
	public int modifyRole(Role r); 
	public int delete(Integer id);
	public int deleteAcl(@Param("rid")Integer rid);
	public int insert(@Param("rid")Integer rid,@Param("modelid")Integer modelid);
	
	public Acl check(@Param("rid")Integer rid,@Param("url")String url);
	public Model checkid(String url);
	public Acl checkmid(@Param("mid")Integer mid,@Param("rid")Integer rid);
}
